/**
 * 
 */
package com.thor.palmmall.spi.communicate;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.thor.palmmall.spi.common.SOperateInfo;
import com.thor.palmmall.spi.common.SQueryResult;
import com.thor.palmmall.spi.common.SResponse;
import com.thor.palmmall.spi.common.SUserGroupLoadParam;

@Path("/1/communicate")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface SCommunicateService {

  @POST
  @Path(value = "/save")
  public SResponse<String> save(SCommunicate communicate, @QueryParam("") SOperateInfo operateInfo);

  @POST
  @Path(value = "/query")
  public SResponse<SQueryResult<SCommunicate>> query(SCommunicateQueryParam queryParam);

  @POST
  @Path(value = "/{id}")
  public SResponse<SCommunicate> get(@PathParam("id") String id, SUserGroupLoadParam param);

  @DELETE
  @Path(value = "/{id}")
  public SResponse<Void> delete(@PathParam("id") String id, @QueryParam("version") long version,
      @QueryParam("") SOperateInfo operateInfo);

}
